<div id="app"></div>
<script>
    let flag = document.createDocumentFragment()
    for(let i = 0;i<10;i++){
        let p = document.createElement("p")
        p.innerText=`哈哈${i}`
        flag.appendChild(p)
    }
    document.querySelector("#app").appendChild(flag)
</script>